package edu.gdut.thesissys.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * GradeProportion entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "grade_proportion", catalog = "gdutmis", uniqueConstraints = @UniqueConstraint(columnNames = "department_id"))
public class GradeProportion extends BaseVo implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8585174371103980443L;
	// Fields

	private Integer gradeProportionId;
	private Department department;
	private Double excellentWeight;
	private Double wellWeight;
	private Double mediumWeight;
	private Double passWeight;
	private Double notPassWeight;

	// Constructors

	/** default constructor */
	public GradeProportion() {
	}

	/** minimal constructor */
	public GradeProportion(Department department) {
		this.department = department;
	}

	/** full constructor */
	public GradeProportion(Department department, Double excellentWeight,
			Double wellWeight, Double mediumWeight, Double passWeight,
			Double notPassWeight) {
		this.department = department;
		this.excellentWeight = excellentWeight;
		this.wellWeight = wellWeight;
		this.mediumWeight = mediumWeight;
		this.passWeight = passWeight;
		this.notPassWeight = notPassWeight;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "Grade_proportion_id", unique = true, nullable = false)
	public Integer getGradeProportionId() {
		return this.gradeProportionId;
	}

	public void setGradeProportionId(Integer gradeProportionId) {
		this.gradeProportionId = gradeProportionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "department_id", unique = true, nullable = false)
	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	@Column(name = "excellent_weight", precision = 6, scale = 3)
	public Double getExcellentWeight() {
		return this.excellentWeight;
	}

	public void setExcellentWeight(Double excellentWeight) {
		this.excellentWeight = excellentWeight;
	}

	@Column(name = "well_weight", precision = 6, scale = 3)
	public Double getWellWeight() {
		return this.wellWeight;
	}

	public void setWellWeight(Double wellWeight) {
		this.wellWeight = wellWeight;
	}

	@Column(name = "medium_weight", precision = 6, scale = 3)
	public Double getMediumWeight() {
		return this.mediumWeight;
	}

	public void setMediumWeight(Double mediumWeight) {
		this.mediumWeight = mediumWeight;
	}

	@Column(name = "pass_weight", precision = 6, scale = 3)
	public Double getPassWeight() {
		return this.passWeight;
	}

	public void setPassWeight(Double passWeight) {
		this.passWeight = passWeight;
	}

	@Column(name = "not_pass_weight", precision = 6, scale = 3)
	public Double getNotPassWeight() {
		return this.notPassWeight;
	}

	public void setNotPassWeight(Double notPassWeight) {
		this.notPassWeight = notPassWeight;
	}

}